import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/test',
    name: 'test',
    component: () => import('../views/Test.vue'),
  },
  {
    meta:{
      hideFooter:true
    },
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue'),
  },
  {
    meta:{
      hideFooter:true
    },
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue'),
  },
  {
    path: '/service',
    name: 'service',
    component: () => import('../views/Service.vue'),
    children:[
      {
        path: 'notice',
        name: 'notice',
        component: () => import('../views/ServiceNotice.vue'),
      },
      {
        path: 'guide',
        name: 'guide',
        component: () => import('../views/ServiceGuide.vue'),
      },
    ]
  },
  {
    path: '/ticket',
    name: 'ticket',
    component: () => import('../views/Ticket.vue'),
  },
  {
    path: '/hotel_show',
    name: 'hotelShow',
    component: () => import('../views/HotelShow.vue'),
  },
  {
    path: '/hotel',
    name: 'hotel',
    component: () => import('../views/Hotel.vue'),
  },
  {
    path: '/food_show',
    name: 'food_show',
    component: () => import('../views/FoodShow.vue'),
  },
  {
    path: '/food',
    name: 'food',
    component: () => import('../views/Food.vue'),
    children:[
      {
        path: 'food_seafood',
        name: 'food_seafood',
        component: () => import('../views/FoodHaixian.vue'),
      },
      {
        path: 'food_hotel',
        component: () => import('../views/FoodHotel.vue'),
      },
    ]
  },
  {
    path: '/zs_play_show',
    name: 'ZsplayShow',
    component: () => import('../views/ZsplayShow.vue'),
  },
  {
    path: '/zs_play',
    name: 'ZsPlay',
    component: () => import('../views/ZsPlay.vue'),
  },
  {
    path: '/scenery_show',
    name: 'sceneryShow',
    component: () => import('../views/SceneryShow.vue'),
  },
  {
    meta:{
      hideFooter: true
    },
    path: '/scenery_list',
    name: 'sceneryList',
    component: () => import('../views/SceneryList.vue'),
  },
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
